package com.xhui.vimarket.zkplus.zul.attr.evt;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.metainfo.ComponentInfo;
import org.zkoss.zul.Div;
import org.zkoss.zul.Label;

import com.xhui.vimarket.zkplus.zul.attr.ada.AttrButtonTextBtnIntf;
import com.xhui.vimarket.zkplus.zul.attr.bean.ButtonTextDataVo;

/**com.xhui.vimarket.zkplus所有 (c) 2010.
 * @文件：com.xhui.vimarket.zkplus.zul.attr.evt.AttrButtonTextBtnComposer.java
 * @所含类：
 * @author: wuyx
 * @version: V1.0
 * @see:
 * @创建日期：2010-12-20
 * @功能说明：客服中心
 * @修改记录： =============================================================<br>
 *        日期:2010-12-20 创建
 *        =============================================================<br>
 */
public class AttrDivExtDivComposer extends AttrBaseComposer implements AttrButtonTextBtnIntf {
    
    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 4579587521568091904L;
    
    /**
     * 上级容器.
     */
    
    private   Div   div;
    
    @Override
    public ComponentInfo doBeforeCompose(final Page page, final Component comp,
        final ComponentInfo info) {
        return info;
    }
    
    @Override
    public void doAfterCompose(final Component comp) throws Exception {
        super.doAfterCompose(comp);     
        this.setSupDiv(comp);
        this.init(comp); 
    }
    
    /**
     * init.
     * @param comp Component
     */
    public void init(final Component comp) {
        Label label = new Label();
        label.setValue("界面控件");
        label.setParent(comp);
        
    }

    
    @Override
    public void beforeValidateExec() {
    }
    
    @Override
    public void onInitVal(Event event) {
        this.initVal();
    }    
    /**
     * doFillReturnData.
     * 
     * @param btdv ButtonTextDataVo
     */
    public void doShowReturnData(final ButtonTextDataVo btdv) {
        this.doFillReturnData(btdv);
    }
    /**
     * .
     * 
     * @param comp Component
     * @return Div
     */
    public Div setSupDiv(final Component comp) {
       this.div = (Div) comp.getParent();
       return this.div;
    }
    
    public Div getSupDiv() {
        return this.div;
     }

    @Override
    public void doFillReturnData(ButtonTextDataVo btdv) {
    }
    
}
